//
//  WDNetworkConfig.h
//  Pods
//
//  Created by Alean on 2022/12/1.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef BOOL(^WDCustomResponseCodeProcessBlock)(NSInteger code, NSString *msg);

// base url 配置
@interface WDNetworkConfig : NSObject

+ (instancetype)sharedConfig;

// 基类url 默认为nil
@property (nonatomic, copy) NSString *baseUrl;

// 默认20s
@property (nonatomic, assign) NSTimeInterval timeoutSeconds;

// 默认参数配置
@property (nonatomic, copy) NSDictionary *defailtParameters;

// 自定义响应头
@property (nonatomic, copy, readonly) NSDictionary *customDict;

// 处理特殊的网络返回码
@property (nonatomic ,copy) WDCustomResponseCodeProcessBlock customResponseCodeProcessBlock;

- (void)setHeaderValue:(NSString *)value key:(NSString *)key;

- (void)removeCustomHeadWithKey:(NSString *)key;

@end

NS_ASSUME_NONNULL_END
